Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | // utilities |
||
13 | export const clickNode = function (node) { |
||
14 | if (document.createEvent) { |
||
15 | let evt = document.createEvent('MouseEvents'); |
||
16 | evt.initEvent('click', true, false); |
||
17 | node.dispatchEvent(evt); |
||
18 | } else if (document.createEventObject) { |
||
19 | node.fireEvent('onclick'); |
||
20 | } else if (typeof node.onclick === 'function') { |
||
21 | node.onclick(); |
||
22 | } |
||
23 | } |